package com.example.Laboratory.Mapper;


import com.example.Laboratory.Entity.Suspended_frame;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface Suspended_frameMapper {

    //增加悬浮框信息
    @Insert("INSERT INTO suspended_frame (suspended_frame_title,suspended_frame_publisher,suspended_frame_time,suspended_frame_text)VALUES(#{suspended_frame_title},#{suspended_frame_publisher},#{suspended_frame_time},#{suspended_frame_text})")
    int addSuspended_frame (Suspended_frame t);

    //根据id删除悬浮框信息
    @Delete("DELETE FROM suspended_frame WHERE suspended_frame_id=#{suspended_frame_id}")
    int deleteSuspended_frame (int suspended_frame_id);

    //查找条数
    @Select("SELECT COUNT(*) FROM suspended_frame")
    int researchSuspended_frame2 ( );

    //修改悬浮框信息
    @Update("UPDATE suspended_frame SET suspended_frame_title=#{suspended_frame_title},suspended_frame_publisher=#{suspended_frame_publisher},suspended_frame_time=#{suspended_frame_time},suspended_frame_text=#{suspended_frame_text} WHERE suspended_frame_id=#{suspended_frame_id}")
    int reviseSuspended_frame (Suspended_frame t);

    //查找悬浮框信息
    @Select("SELECT * FROM suspended_frame ")
    Suspended_frame researchSuspended_frame ( );

}
